/**
 * 百分数转数值
 * @param percent
 * @returns
 */
export const percentToNum = (percent?: string): number => {
    if (!percent) return 0

    if (percent.indexOf('%') === -1) return 0

    if (Number.isNaN(percent.replace('%', ''))) return 0

    return Number(percent.replace('%', ''))
}
